#ifndef COLLIDER_H
#define COLLIDER_H

#include "core/Component.h"
#include "types/Collision.h"
#include "types/Rect.h"


namespace SolidityEngine {

class Collider : public Component
{
    public:
        Collider();
        virtual ~Collider();

        //Test this collider againsed another collider
        Collision_ptr Test(Collider* col)
        {
            if(_enabled) return _Test(col);
            return Collision_ptr();
        };

        Rect GetBounds() const {return _GetBounds();};

        //return the cetnre of the collider
        Vector2D GetCenter() const {return _GetCenter();};

    private:
        virtual Vector2D _GetCenter() const=0;

        //Get the bounding box of this collider - useful in collision testing
        virtual Rect _GetBounds() const=0;

        virtual Collision_ptr _Test(Collider* col)=0;

};


};
#endif // COLLIDER_H
